﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using APH.Parl2.Shared.Contracts;
using System.ServiceModel;
using APH.Parl2.Data.DataAccess.Publishing;

namespace APH.Parl2.Business.Publishing
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, UseSynchronizationContext = false)]
    public class PublishingEngine : IPublishingEngine
    {
        [OperationBehavior(TransactionScopeRequired = true)]
        public Guid PublishDocument(TranslatedDocumentData documentData)
        {
            return WriteHelper.CreateDocument(documentData.Author, documentData.DocumentXml);
        }
    }
}
